<?php

abstract class MM_Controller_Mobile_Action extends Mediad2_Controller_Action
{
	/**
	 * var
	 */
	protected $eid = null;
	protected $uid = null;
	protected $esid = null;
	protected $fid = null;
	
	/**
	 * @var MM_Service_Facade
	 */
	protected $service = null;
	
    /** 
     * 初始化
     */
    public function init ()
    {
    	parent::init();
    	
    	$this->service = new MM_Service_Facade();
    	
    	//user id
    	if (isset($this->httpdata['uid'])) {
    		$this->uid = $this->httpdata['uid'];
    	} else {
    		if (isset($this->httpdata['auth'])) {
    			$this->uid = $this->functions->getIdFromAuth($this->httpdata['auth']);
    		}
    	}
    	
    	//event id
        if (isset($this->httpdata['eid'])) {
    		$this->eid = $this->httpdata['eid'];
    	} else {
    		if (isset($this->httpdata['eventqrcode'])) {
    			$len = strlen($this->httpdata['eventqrcode']);
    			$this->eid = $this->functions->decodeQrcode($this->httpdata['eventqrcode'],$len);
    		}
    	}
    	
    	//event schedule id
    	if (isset($this->httpdata['esid'])) {
    		$this->esid = $this->httpdata['esid'];
    	} else {
    		$this->esid = 0;
    	}
    	
    	//event fid id
        if (isset($this->httpdata['fid'])) {
    		$this->fid = $this->httpdata['fid'];
    	} 

    }
	
	//---------------------------------------------------------
	// 接口
	//---------------------------------------------------------
	

}
